|
This page last changed on May 13, 2009 by kgomes.
In order to read in data from the ESP, the GUI will use the ESP's log (real.log) file as the official 'interface' for data collection. In order to facilitate this, this page documents what the entries in the log file should look like so that the ESP GUI will not have to make extensive and fragile rules to try and interpret the data. The esp gui log data should have the following format in the context the raw log file:
EVENT-NAME,attribute=value,...
Notes:
- Time is designated using epoch seconds (number of seconds that have elapsed since January 1, 1970) in GMT
- EVENT_NAME is one of the following:
- BEGIN_MISSON
- PHASE_START
- PHASE_END
- PROTOCOL_START
- PROTOCOL_END
- SAMPLE_START
- SAMPLE_END
- CAMERA_SNAP
- END_MISSION
- Attributes are key=value pairs and vary from event to event. Attributes for the various events are:
- BEGIN_MISSON
- No attributes
- Example: BEGIN_MISSION
- PHASE_START
- phase_name=XXXXXX (e.g. hab, larv, da, habda)
- Example: PHASE_START,phase_name=hab
- PHASE_END
- phase_name=XXXXXX (e.g. hab, larv, da, habda)
- phase_start=EPOCH_SECONDS (this is the time that the phase started. This is necessary due to the fact there are multiple threads the name & start date are the unique key.)
- Example: PHASE_END,phase_name=hab,phase_start=1231372399
- PROTOCOL_START
- phase_name=XXXXXX (e.g. hab, larv, da, habda)
- phase_start=EPOCH_SECDONDS
- protocol_name=PPPPP (e.g. sh1, sh2, wcr)
- Example: PROTOCOL_START,phase_name=hab,phase_start=1231372399,protocol_name=sh1
- PROTOCOL_END
- phase_name=XXXXXX (e.g. hab, larv, da, habda)
- phase_start=EPOCH_SECONDS
- protocol_name=PPPPP (e.g. sh1, sh2, wcr)
- protocol_start=EPOCH_SECONDS
- Example: PROTOCOL_END,phase_name=hab,phase_start=1231372399,protocol_name=sh1,protocol_start=1231372399
- SAMPLE_START
- phase_name=XXXXXX (e.g. hab, larv, da, habda)
- phase_start=YYYY-MM-DDThh:mm:ssZ
- protocol_name=PPPPP (e.g. sh1, sh2, wcr)
- protocol_start=EPOCH_SECONDS
- target_volume=ZZZZml
- Example: SAMPLE_START,phase_name=hab,phase_start=1231372399,protocol_name=sh1,protocol_start=1231372399,target_volume=1000ml
- SAMPLE_END
- phase_name=XXXXXX (e.g. hab, larv, da, habda)
- phase_start=EPOCH_SECONDS
- protocol_name=PPPPP (e.g. sh1, sh2, wcr)
- protocol_start=EPOCH_SECONDS
- sample_volume=ZZZZml
- Example: SAMPLE_END,phase_name=hab,phase_start=1231372399,protocol_name=sh1,protocol_start=1231372399,sample_volume=934.1ml
- CAMERA_SNAP
- phase_name=XXXXXX (e.g. hab, larv, da, habda)
- phase_start=EPOCH_SECONDS
- file_name=ZZZZZZZZZ.tif
- auto_exposure=AAAAAAAs
- Example: CAMERA_SNAP,phase_name=hab,phase_start=1231372399,file_name=bac08oct1716h450ml40s.tif,auto_exposure=123.4s
Rich made the changes to the ruby code to generate the log entries in the following format:
- protocol/BAC.rb
- Thread.log.data "BAC_BACSH1_START"
- Thread.log.data "BAC_BACSH1_START"
- Thread.log.data "BAC_SHORTBACSH2_START"
- Thread.log.data "BAC_SHORTBACSH2_END"
- Thread.log.data "BAC_PHASE_START"
- Thread.log.data "BAC_PHASE_END"
- protocol/samplepass.rb
- Thread.log.data "SAMPLEPASS_LYFIL_START"
- Thread.log.data "SAMPLEPASS_LYFIL_END"
- protocol/PUFM.rb
- Thread.log.data "PUFM_START"
- Thread.log.data "PUFM_END"
- Thread.log.data "PUFM_WITHINITIALPURGE_START"
- Thread.log.data "PUFM_WITHINITIALPURGE_END"
- protocol/HAB.rb
- Thread.log.data "HAB_HABSH1_START"
- Thread.log.data "HAB_HABSH1_END"
- Thread.log.data "HAB_SHORTHABSH2_START"
- Thread.log.data "HAB_SHORTHABSH2_END"
- Thread.log.data "HAB_PHASE_START"
- Thread.log.data "HAB_PHASE_END"
- protocol/wcr.rb
- Thread.log.data "WCR_PROTOCOL_START," + " volume=#{sampleVolume}"
- Thread.log.data "WCR_PROTOCOL_END"
- protocol/DA.rb
- Thread.log.data "DA_DAEXTRACT_START"
- Thread.log.data "DA_DAEXTRACT_END"
- Thread.log.data "DA_START"
- Thread.log.data "DA_END"
- Thread.log.data "DA_SHORTDA_START"
- Thread.log.data "DA_SHORTDA_END"
- Thread.log.data "DA_HAB4DA_START"
- Thread.log.data "DA_HAB4DA_END"
- Thread.log.data "DA_HABDA_START"
- Thread.log.data "DA_HABDA_END"
- protocol/utilities.rb
- Thread.log.data "PROTOCOLARGS, assay=#{opts[:assay]}, maxvolume=#{sampleVolume.first}, wcrmaxvolume=#{sampleVolume.last}"
- Thread.log.data "INITIALPURGE_START"
- Thread.log.data "INITIALPURGE_END"
- Thread.log.data "FINALPURGE_START"
- Thread.log.data "FINALPURGE_END"
- protocol/LARV.rb
- Thread.log.data "LARV_LARVSH1_START"
- Thread.log.data "LARV_LARVSH1_END"
- Thread.log.data "LARV_SHORTLARVSH2_START"
- Thread.log.data "LARV_SHORTLARVSH2_END"
- Thread.log.data "LARV_PHASE_START"
- Thread.log.data "LARV_PHASE_END"
- Thread.log.data "LARV_PHASE_WITHPURGE_START"
- Thread.log.data "LARV_PHASE_WITHPURGE_END"
- protocol/sh2.rb
- Thread.log.data "SH2_PROTOCOL_START"
- Thread.log.data "SH2_PROTOCOL_END"
- Thread.log.data "SH2_SHORTSH2_START"
- Thread.log.data "SH2_SHORTSH2_END"
- Thread.log.data "SH2_SH2CORE_START, phase=#{phase},label=#{label}"
- Thread.log.data "SH2_SH2CORE_END"
- protocol/sh1.rb
- Thread.log.data "SH1_PROTOCOL_START"
- Thread.log.data "SH1_PROTOCOL_END"
- Thread.log.data "SH1_COLLECTSAMPLE, " + "volume=#{sampleVolume}, bubblepoint=#{collectionSampler.bubblePt}"
- Thread.log.data "SH1_COLLECTSAMPLE_COMPLETE"
- Thread.log.data "SH1_LYSING, volume=#{lysisVolume},solution=#{lysisSolution}"
- protocol/MFB.rb
- Thread.log.data "MFB_MFBSH1_START"
- Thread.log.data "MFB_MFBSH1_END"
- Thread.log.data "MFB_START"
- Thread.log.data "MFB_END"
- protocol/KAR.rb
- Thread.log.data "KAR_KARSH1_START"
- Thread.log.data "KAR_KARSH1_START"
- Thread.log.data "KAR_SHORTKARSH2_START"
- Thread.log.data "KAR_SHORTKARSH2_END"
- Thread.log.data "KAR_PHASE_START"
- Thread.log.data "KAR_PHASE_END"
- lib/esp.rb
- Thread.log.data "LIB_ESP_IRB_START, string=" + $0
- Thread.log.data "LIB_ESP_CONFIG,instrumentname=#{Name}, cfgpath=#{ConfigPath}"
- Thread.log.data "LIB_ESP_IRB_END"
- Thread.log.data "LIB_ESP_APPLICATION_START, string=" + $0
- Thread.log.data "LIB_ESP_CONFIG, instrumentname=#{Name}, cfgpath=#{ConfigPath}"
- Thread.log.data "LIB_ESP_APPLICATION_END"
- lib/cmdserver.rb
- Thread.log.data "LIB_CMDSERVER_ABORTMISSION" + reason
- Thread.log.data "CAMERA_SNAP, " + "string=#{instance}: #{SNAP} #{args}"
- Thread.log.data "CAMERA_OUTPUT_" + myn.to_s + ", string= " + line
 |
above should expand to:
|
- utils/puckmoves.rb
- Thread.log.data "PUCKMOVES_LOADCLAMP, " +
 |
above expand to:
|
- Thread.log.data "PUCKMOVES_LOADCLAMP_EMPTYTUBE, tube=#{tube}"
- Thread.log.data "PUCKMOVES_UNLOADCLAMP, " + guiMsg % [source.label, clamp.name, toTube]
 |
above expand to:
|
- utils/misc.rb
- Thread.log.data "MISC_STORAGE_SELECTTUBE_TO"
- Thread.log.data "MISC_STORAGE_SELECTTUBE"
- Thread.log.data "MISC_STORAGE_SRCTUBE, tube=" + startingTube.to_s
- Thread.log.data "MISC_SRCTUBE"
- Thread.log.data "MISC_DSTTUBE"
- utils/sampler.rb
- Thread.log.data "SAMPLER_SAMPLED, " + "volume=%.1f" % sampledVol
- mission/08sep.rb
- Thread.log.data "MISSION_START, esp=#{ESP::Name}, mission=#{ESP::Mission}, starttube=#{startTube}, fromtube=#{fromTube}"
- Thread.log.data "MISSION_END, esp=#{ESP::Name}, mission=#{ESP::Mission}"
 | Above was changed
Essentially the message are the same, but Brent pulled the method calls into a :protocol method defined in utils.rb so the individual protocols don't have to do anything specific. |
|
See the new page I just added about parsing these entries on the context of the raw log file.
These entries may be defined any way you like
I don't see how "phases" can have names. A phase is a sequence of protocols.
Generally, the ESP sleeps between phases.
I like the key=value format, but please try to shorten the key names a bit. This log file is too big as it is.
I kind of like the idea of units suffixes, if you really intend to parse them. But, if you are just going to ignore them,
I'd rather omit them entirely. That means, the data manager has to know that 1L == 1000ml
Are you up for that?

Posted by brent at Jan 07, 2009 22:49
|
|